package control;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.StudentService;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class StudentController extends MultiActionController {
	private StudentService studentService;
	
	public StudentController(StudentService studentService) {
		super();
		this.studentService = studentService;
	}
	// 처음에 학생 목록 불러오기
	public ModelAndView st_manager(HttpServletRequest request, HttpServletResponse response){
		System.out.println("st_manager join..");
		return new ModelAndView("student/st_manager");
	}
	// 목록에서 학생 클릭시 select 후 학생정보 보여주기
	public ModelAndView st_info(HttpServletRequest request, HttpServletResponse response){
		System.out.println("st_info join..");
		return new ModelAndView("student/st_info");
	}
	// 학생 입력 완료시 insert 후 학생정보 보여주기
	public ModelAndView st_insert(HttpServletRequest request, HttpServletResponse response){
		System.out.println("st_insert join..");
		return new ModelAndView("student/st_info");
	}
	// 학생 수정시 정보 가져와서 수정화면 보여주기
	public ModelAndView st_modify(HttpServletRequest request, HttpServletResponse response){
		System.out.println("st_modify join..");
		return new ModelAndView("student/st_modify");
	}
	// 학생 제명시 delete 후 목록 보여주기
	public ModelAndView delete(HttpServletRequest request, HttpServletResponse response){
		System.out.println("delete join..");
		return new ModelAndView("student/st_manager");
	}
	// 학생 수정 완료시 update후 학생정보 보여주기
	public ModelAndView modify_result(HttpServletRequest request, HttpServletResponse response){
		System.out.println("modify_result join..");
		return new ModelAndView("student/st_info");
	}
	
}	
